package cn.myjerry.others.que;
/**
 * 测试自定义堆栈
 * @author Jerry
 *
 */
public class Demo02 {
	public static void main(String[] args) {
		Mystack<String> backHistory = new Mystack<String>(3);
		backHistory.push("www.myjerry.cn");
		backHistory.push("www.baidu.cn");
		backHistory.push("www.sina.cn");
		backHistory.push("www.google.cn");
		
		System.out.println(backHistory.size());
		
		String item = null;
		while(null != (item = backHistory.pop())){
			System.out.println(item);
		}
	}
}
